//提供 封装了 执行 登录 注册 相关功能的 异步请求的api方法
//导入 axios
import axios from "@/utils/request.js";

//按需导出 api方法
export const getGoodsCate = (params) => axios({
    url: 'categories',
    params
})

export const getSelList = (id,params) => axios({
    url: `categories/${id}/attributes`,
    params
})

export const addParams = (id,data) => axios({
    url: `categories/${id}/attributes`,
    method: 'post',
    data
})

export const chkParams = (id,attrId,params) => axios({
    url: `categories/${id}/attributes/${attrId}`,
    params
})

export const subEditParams = (id,attrId,data) => axios({
    url: `categories/${id}/attributes/${attrId}`,
    method: 'put',
    data
})

export const delParams = (id, attrid) => axios({
    url: `categories/${id}/attributes/${attrid}`,
    method:'delete'
})
